<%-- 
    Document   : Registration
    Created on : May 28, 2012, 10:08:03 AM
    Author     : LAVANYA
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <head>
        <title>Registration Form</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <style>
            h2 {color:white; font-family:"Times New Roman";}
            td {color:black; font-family:"Times New Roman";}
            th {color:white; font-family:"Times New Roman";}
        </style>
        <script src = "validreg.js" language = "javascript"></script>
        <script>
            function verifyEmail()
            {
                var status = false;     
                var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
                if (document.regform.User_Id.value.search(emailRegEx) == -1)
                {
                    alert("Please enter a valid email address.");
                }
                if (document.regform.Pass_word.value != document.regform.Pass_word2.value)
                {
                    alert("Passwords do not match.  Please retype them to make sure they are the same.");
                }
            return status;
            }
        </script>
        <link rel="stylesheet" href='style.css' type="text/css" />

    </head>
    <body>
        <table width="974" border="0" style="position:relative; top:-17px; margin-left:auto; margin-right:auto;" cellspacing="10">
            <tr>
                <td background="images/bgg.jpg" height="130px" width="90px" colspan="2" align="center">
                    
                </td>
            </tr>
            <tr>
                <td align="center" colspan="2">
                    <div id="navigation">
                        <ul>
                            <li><a href="index.jsp">Home</a></li>
                            <li><a href="Login.jsp">Sign In</a></li>
                            <li><a href="Registration.jsp">Sign Up</a></li>
                            <li><a href="ContactUs.jsp">Contact Us</a></li>
                    


                        </ul>
                    </div>    



                </td>
            </tr>
            <tr>
                <td><br>
                    <form action='./insert' method="POST" name="regform" onSubmit = "return isValid(this)">
                        <input type="hidden" name="action" value="login">
                        <input type="hidden" name="hide" value="">
                        <table align="center" border="0">
                            <tr>
                                <th colspan="2" bgcolor="#003471">
                                    <font style="font-size:1.5em;" >  Please Enter The Details To Register:</font>
                                </th>
                            </tr>
                            <tr> 
                                <td>Enter A Valid Email Id:&nbsp;</td>
                                <td><input type="text" name="User_Id" value="" onBlur="verifyEmail();" size="15" /></td>
                            </tr>

                            <tr> 
                                <td>Password:&nbsp;</td>
                                <td> <input type="password" name="Pass_word" value="" size="15"/></td>
                            </tr>
                            <tr> 
                                <td>Re-Enter Password:&nbsp;</td>
                                <td> <input type="password" name="Pass_word2" value="" size="15" onBlur="verifyEmail();"/></td>
                            </tr>
                            <tr> 
                                <td>First Name</td>
                                <td> <input type="text" name="FirstName" value="" size="15" /> </td>
                            </tr>

                            <tr> 
                                <td>Last Name:&nbsp;</td>
                                <td><input type="text" name="LastName" value="" size="15" /></td>
                            </tr>
                            
                            <tr>
                                <td>City:&nbsp;</td>
                                <td><input type="text" name="City" value="" size="15" /> </td>
                            </tr>

                            <tr>
                                <td>Country:&nbsp;</td>
                                <td><input type="text" name="Country" value="" size="15" /> </td>
                            </tr>

                            <tr>
                                <td>ZIP Code:</td>
                                <td><input type="text" name="ZIP" value="" size="15" /> </td>
                            </tr>

                            <tr>
                                <td>Contact No.:&nbsp;</td>
                                <td><input type="text" name="PhoneNo" value="" size="15" /> </td>
                            </tr>
                            
                            <tr>
                                <td>Gender:&nbsp;</td>
                                <td> <input type="radio" name="sex" value="Male" checked="checked" >Male &nbsp;
                                    <input type="radio" name="sex" value="Female" >Female</td>
                            </tr>

                            <tr>
                                <td> Date Of Birth:&nbsp;</td>
                                <td> Day:<input type="text" name="day" value="[DD]" size="2" /> &nbsp;
                                    Month:<input type="text" name="month" value="[MM]" size="2" />  &nbsp;
                                    Year:<input type="text" name="year" value="[YYYY]" size="4" /> 
                                        
                                        
                                        
                                   
                                </td>
                            </tr>
                            

                            <tr>
                                <td colspan="2">
                            <center><br><br><input type="submit" value="Register" name="sub"> &nbsp; 
                                <input type="reset" value="Clear" name="clr" />
                            </center>
                            </td></tr>
                        </table>
                    </form>
                </td>
            </tr>
        </table>
    </body>
</html>
